package com.zhoukun.cloud.controller;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.messaging.Message;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoukun 86547462@qq.com
 * @version 1.0
 * @date 2020/10/30 2:23
 */
@RestController
@EnableBinding(Sink.class)
public class messagecontroller {


    @StreamListener(Sink.INPUT)
    public void input(Message<String> message)
    {

        System.out.println("8802服务消费者接收到了："+message.getPayload());
    }
}
